package com.gthncz;

import java.util.Scanner;

public class SumArray {

    private double sum(int n){
        if (n <= 0) return 0.0;
        double res = 0.0;
        for (int i=1; i<=n; ++i){
            double temp = 0.2 * (1.0/(2*n-1) - 1.0/(2*n));
            res += temp;
        }
        return res;
    }

    public static void main(String[] args){
        SumArray main = new SumArray();
        Scanner sc = new Scanner(System.in);
        while (true){
            int n = sc.nextInt();
            double res = main.sum(n);
            res = Math.round(res*1e+4) / 1e+4;
            System.out.printf("%.4f", res);
        }
    }
}
